<!--公共头部-->
{template 'aitimt/common/login_header'}
<style>
    * {touch-action: pan-y;}
   .login-logo{width: 10rem;margin: 30% 30% 10% 30%;height: 7rem;}
   .login-logo img{width: 100%;padding: 25% 15%;}
   .login-weixin{height: 2.2rem;margin: 0 5% 2% 5%;width: 90%;border-radius: 20px;font-size: 15px;color: #ffffff;background: #f39800;}
   .login-phone{height: 2.2rem;margin: 0 5%;width: 90%;border-radius: 20px;font-size: 15px;color: #000000;}
   .login-xieyi{text-align: center;margin-top: 10%;font-size: 12px;}
   /*协议*/
   .mui-popover .mui-scroll-wrapper .mui-scroll{background: white;padding: 0 5%;}
   .mui-popover .mui-scroll p{color: #0C0C0C;}
    .mui-popover .mui-scroll-wrapper{height: 85%;margin: 5%;width: 90%;}
    .pop-btn{height: 2.2rem;margin: 0 5% 10% 5%;width: 90%;border-radius: 20px;font-size: 15px;color: #ffffff;background: #f39800;display: block;text-align: center;line-height: 2.2rem;position: absolute;bottom: 0}
</style>

<div class="mui-content">
    <div id="userAgreement"  style="z-index: 999;height: 100%" class="box mui-popover mui-popover-action mui-popover-bottom">
        <div class="mui-scroll-wrapper">
            <div class="mui-scroll">
                {$_W['_config']['joinagreement']}
            </div>
        </div>
        <a type="button" class="pop-btn" href="#userAgreement">
            确认并关闭
        </a>
    </div>
    <div id="hideAgreement"  style="z-index: 999;height: 100%" class="box mui-popover mui-popover-action mui-popover-bottom">
        <div class="mui-scroll-wrapper">
            <div class="mui-scroll">
                {$_W['_config']['proagreement']}
            </div>
        </div>
        <a type="button" class="pop-btn" href="#hideAgreement">
            确认并关闭
        </a>
    </div>
    <div class="login-logo">
        <img src="{$aideUrl}app/resource/aitimt/images/login01.png" >
    </div>
    <button type="button" class="login-weixin" onclick="getLogin('weixin')">
        微信登陆
    </button>
    <button type="button" class="login-phone" onclick="getLogin('phone')">
        手机登陆/注册
    </button>
    <p class="login-xieyi">登陆代表您已同意爱计时赛事平台<a href="#userAgreement">用户协议</a>、<a href="#hideAgreement">隐私协议</a></p>
</div>

<script type="text/javascript">
    //数据发送
    mui.init();
    mui('.mui-scroll-wrapper').scroll({
        scrollY: true, //是否竖向滚动
    });
    function getLogin(type){
        $.post("{php echo app_url('home/index/login')}", {type:type}, function(data){
            console.log(data);
            if(data.errno == 0){
                location.href = data.url;
            }else{
                mui.toast('服务器错误！');
            }
        },"json");
    }
</script>

</body>

</html>
